import { post } from '../http'

// 角色列表
export const getList = (data) => post({ url: '/role/getList', data })

// 新增保存
export const roleCreate = (data) => post({ url: '/role/create', data })

// 详情
export const roleDetail = (data) => post({ url: '/role/update', data })

// 更新编辑
export const roleUpdate = (data) => post({ url: '/role/update', data })

// 删除角色
export const roleDel = (data) => post({ url: '/role/delete', data })

// 启用/停用
export const roleEnable = (data) => post({ url: '/role/enableAndDisableRole', data })

// pc端and移动端后台权限修改
export const updateResources = (data) => post({ url: '/role/updateResources', data })

// 获取企业角色
export const getEpList = (data) => post({ url: '/role/getEpList', data })

// 获取后台权限组织树
export const getResource = (data) => post({ url: '/resource/getResource', data })

// 判断角色是否关联人员
export const isRoleUser = (data) => post({ url: '/role/countRoleUser', data })
